PROMPT 4: CONVERT A WORKING JSX TO UXP
Use only after the JSX runs without errors.

This ExtendScript (.jsx) works in InDesign [e.g. 2026, version 22]. Convert it to a UXP script (.idjs) for the same InDesign version.

Rules: use the official Adobe InDesign UXP scripting API and modern JavaScript, load the app with require("indesign"), read page.json with the UXP file system, keep the same layout, styles, colours and export steps, and do not mix in ExtendScript code.

Give me the full .idjs code in one code block, and tell me in three lines what changed from the JSX.

[paste the working JSX]
